using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ResetPwdRequest : GeneratedMessageLite<ResetPwdRequest, ResetPwdRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ResetPwdRequest, ResetPwdRequest.Builder>
		{
			private bool resultIsReadOnly;
			private ResetPwdRequest result;
			protected override ResetPwdRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ResetPwdRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ResetPwdRequest DefaultInstanceForType
			{
				get
				{
					return ResetPwdRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public uint OpCode
			{
				get
				{
					return this.result.OpCode;
				}
				set
				{
					this.SetOpCode(value);
				}
			}
			public string Pwd
			{
				get
				{
					return this.result.Pwd;
				}
				set
				{
					this.SetPwd(value);
				}
			}
			public Builder()
			{
				this.result = ResetPwdRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ResetPwdRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ResetPwdRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ResetPwdRequest other = this.result;
					this.result = new ResetPwdRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ResetPwdRequest.Builder Clear()
			{
				this.result = ResetPwdRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ResetPwdRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ResetPwdRequest.Builder(this.result);
				}
				return new ResetPwdRequest.Builder().MergeFrom(this.result);
			}
			public override ResetPwdRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ResetPwdRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is ResetPwdRequest)
				{
					return this.MergeFrom((ResetPwdRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ResetPwdRequest.Builder MergeFrom(ResetPwdRequest other)
			{
				return this;
			}
			public override ResetPwdRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ResetPwdRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ResetPwdRequest._resetPwdRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ResetPwdRequest._resetPwdRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasOpCode = input.ReadUInt32(ref this.result.opCode_);
							continue;
						}
						if (num3 == 26u)
						{
							this.result.hasPwd = input.ReadString(ref this.result.pwd_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ResetPwdRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public ResetPwdRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public ResetPwdRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public ResetPwdRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public ResetPwdRequest.Builder SetOpCode(uint value)
			{
				this.PrepareBuilder();
				this.result.hasOpCode = true;
				this.result.opCode_ = value;
				return this;
			}
			public ResetPwdRequest.Builder ClearOpCode()
			{
				this.PrepareBuilder();
				this.result.hasOpCode = false;
				this.result.opCode_ = 0u;
				return this;
			}
			public ResetPwdRequest.Builder SetPwd(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasPwd = true;
				this.result.pwd_ = value;
				return this;
			}
			public ResetPwdRequest.Builder ClearPwd()
			{
				this.PrepareBuilder();
				this.result.hasPwd = false;
				this.result.pwd_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int OpCodeFieldNumber = 2;
		public const int PwdFieldNumber = 3;
		private static readonly ResetPwdRequest defaultInstance;
		private static readonly string[] _resetPwdRequestFieldNames;
		private static readonly uint[] _resetPwdRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasOpCode;
		private uint opCode_;
		private bool hasPwd;
		private string pwd_ = "";
		private int memoizedSerializedSize = -1;
		public static ResetPwdRequest DefaultInstance
		{
			get
			{
				return ResetPwdRequest.defaultInstance;
			}
		}
		public override ResetPwdRequest DefaultInstanceForType
		{
			get
			{
				return ResetPwdRequest.DefaultInstance;
			}
		}
		protected override ResetPwdRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public uint OpCode
		{
			get
			{
				return this.opCode_;
			}
		}
		public string Pwd
		{
			get
			{
				return this.pwd_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasOpCode && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasOpCode)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.OpCode);
				}
				if (this.hasPwd)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.Pwd);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ResetPwdRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] resetPwdRequestFieldNames = ResetPwdRequest._resetPwdRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, resetPwdRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasOpCode)
			{
				output.WriteUInt32(2, resetPwdRequestFieldNames[1], this.OpCode);
			}
			if (this.hasPwd)
			{
				output.WriteString(3, resetPwdRequestFieldNames[2], this.Pwd);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasOpCode)
			{
				num ^= this.opCode_.GetHashCode();
			}
			if (this.hasPwd)
			{
				num ^= this.pwd_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ResetPwdRequest resetPwdRequest = value as ResetPwdRequest;
			return resetPwdRequest != null && (this.hasBaseRequest == resetPwdRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(resetPwdRequest.baseRequest_))) && (this.hasOpCode == resetPwdRequest.hasOpCode && (!this.hasOpCode || this.opCode_.Equals(resetPwdRequest.opCode_))) && (this.hasPwd == resetPwdRequest.hasPwd && (!this.hasPwd || this.pwd_.Equals(resetPwdRequest.pwd_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ResetPwdRequest, ResetPwdRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<ResetPwdRequest, ResetPwdRequest.Builder>.PrintField("OpCode", this.hasOpCode, this.opCode_, writer);
			GeneratedMessageLite<ResetPwdRequest, ResetPwdRequest.Builder>.PrintField("Pwd", this.hasPwd, this.pwd_, writer);
		}
		public static ResetPwdRequest ParseFrom(byte[] data)
		{
			return ResetPwdRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ResetPwdRequest MakeReadOnly()
		{
			return this;
		}
		public static ResetPwdRequest.Builder CreateBuilder()
		{
			return new ResetPwdRequest.Builder();
		}
		public override ResetPwdRequest.Builder ToBuilder()
		{
			return ResetPwdRequest.CreateBuilder(this);
		}
		public override ResetPwdRequest.Builder CreateBuilderForType()
		{
			return new ResetPwdRequest.Builder();
		}
		public static ResetPwdRequest.Builder CreateBuilder(ResetPwdRequest prototype)
		{
			return new ResetPwdRequest.Builder(prototype);
		}
		static ResetPwdRequest()
		{
			ResetPwdRequest.defaultInstance = new ResetPwdRequest().MakeReadOnly();
			ResetPwdRequest._resetPwdRequestFieldNames = new string[]
			{
				"BaseRequest",
				"OpCode",
				"Pwd"
			};
			ResetPwdRequest._resetPwdRequestFieldTags = new uint[]
			{
				10u,
				16u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.ResetPwdRequest.Descriptor, null);
		}
	}
}
